package bmptest.bmp.log;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @author lyq
 * @date 2021/9/6 9:52
 * 日志测试lei
 */

public class Log4j2Test {

    public static void main(String[] args) {
/*    public static void getLogger(){*/
        Logger logger = LogManager.getLogger("RollingRandomAccessFileLogger");
        for(int i = 0; i < 50000; i++) {
            logger.trace("trace level");
            logger.debug("debug level");
            logger.info("info level");
            logger.warn("warn level");
            logger.error("error level");
            logger.fatal("fatal level");
        }

        try {
            Thread.sleep(1000 * 61);
        } catch (InterruptedException e) {}

        logger.trace("trace level");
        logger.debug("debug level");
        logger.info("info level");
        logger.warn("warn level");
        logger.error("error level");
        logger.fatal("fatal level");
    }

}
